import {getCurrentInstance, reactive} from "vue";
import useTable from "@/views/system/menu/hooks/useTable";
export const  searchForm = reactive({
    menuName: ''
})
function useSearch() {
    const instance = getCurrentInstance()
    const {getDataList} = useTable();
    function handleSearch() {
        getDataList()
    }
    function resetSearchForm() {
        //eslint-disable-next-line
        (instance?.refs.searchFormRef as any).resetFields()
        getDataList()
    }
    return {
        searchForm,
        handleSearch,
        resetSearchForm
    }
}
export default useSearch
